'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.bulkInsert('user', [
      {
        openid: 'demo_openid_001',
        phone: '18630710017',
        password: '$2b$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
        nickname: '管理员',
        avatar_url: 'https://via.placeholder.com/100x100/007AFF/FFFFFF?text=Admin',
        status: 1,
        create_time: new Date(),
        update_time: new Date()
      },
      {
        openid: 'demo_openid_002',
        phone: '18630710018',
        password: '$2b$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
        nickname: '质检员',
        avatar_url: 'https://via.placeholder.com/100x100/FF9500/FFFFFF?text=QC',
        status: 1,
        create_time: new Date(),
        update_time: new Date()
      }
    ]);
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.bulkDelete('user', null, {});
  }
};
